function [bmean]=olsmomentW(Y,X1,W)
% Weighted OLS regression
WW=repmat(W,[1 size(X1,2)]);

bmean=((X1.*WW)'*X1)\((X1.*WW)'*Y);


